package com.zzyl.nursing.domain;

import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.zzyl.common.annotation.Excel;
import com.zzyl.common.core.domain.BaseEntity;

/**
 * nursingTask对象 nursing_task
 * 
 * @author ruoyi
 * @date 2025-10-29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("nursingTask实体")
public class NursingTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
    * 主键ID
    */
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
    * 老人ID
    */
    @Excel(name = "老人ID")
    @ApiModelProperty(value = "老人ID")
    private Long elderId;

    /**
    * 老人姓名
    */
    @Excel(name = "老人姓名")
    @ApiModelProperty(value = "老人姓名")
    private String elderName;

    /**
    * 床位编号
    */
    @Excel(name = "床位编号")
    @ApiModelProperty(value = "床位编号")
    private String bedNumber;

    /**
    * 项目ID
    */
    @Excel(name = "项目ID")
    @ApiModelProperty(value = "项目ID")
    private Integer projectId;

    /**
    * 护理项目名称
    */
    @Excel(name = "护理项目名称")
    @ApiModelProperty(value = "护理项目名称")
    private String projectName;

    /**
    * 护理员ID
    */
    @Excel(name = "护理员ID")
    @ApiModelProperty(value = "护理员ID")
    private String nursingId;
    /**
     * 护理员姓名
     */
    @Excel(name = "护理员姓名")
    @ApiModelProperty(value = "护理员姓名")
    @TableField(value = "nursing_name", typeHandler = JacksonTypeHandler.class)
    private List<String> nursingName;

    /**
    * 预计服务时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预计服务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "预计服务时间")
    private LocalDateTime estimatedServerTime;

    /**
    * 实际服务时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际服务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "实际服务时间")
    private LocalDateTime realServerTime;

    /**
    * 状态：1待执行 2已执行 3已关闭
    */
    @Excel(name = "状态：1待执行 2已执行 3已关闭")
    @ApiModelProperty(value = "状态：1待执行 2已执行 3已关闭")
    private Integer status;

    /**
    * 执行记录（执行后填写）
    */
    @Excel(name = "执行记录", readConverterExp = "执=行后填写")
    @ApiModelProperty(value = "执行记录")
    private String mark;

    /**
    * 执行图片URL（如OSS链接）
    */
    @Excel(name = "执行图片URL", readConverterExp = "如=OSS链接")
    @ApiModelProperty(value = "执行图片URL")
    private String taskImage;

    /**
     * 执行人姓名
     */
    private String updater;
    /**
    * 取消原因（仅当status=3时有效）
    */
    @Excel(name = "取消原因", readConverterExp = "仅=当status=3时有效")
    @ApiModelProperty(value = "取消原因")
    private String cancelReason;

    @TableField(exist = false)
    private Integer taskType;

    /**
     * 开始时间
     */
    @TableField(exist = false)
    private String startTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    private String endTime;


}
